package com.realtyManage.springboot.Dao;

import com.realtyManage.springboot.Model.Do.Favourite;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FavouriteRepository extends JpaRepository<Favourite, Integer>, JpaSpecificationExecutor<Favourite> {

    Favourite findByConnUserIdAndConnHouseIdAndState(int uid, int connHouseId, int state);

    List<Favourite> findByConnUserIdAndStateOrderByInsertDateDesc(int uid, int state);
}
